﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.IBLL;
using KPIS.GERP.GIMS.IDAL;
using KPIS.GERP.GIMS.DALFactory;

namespace KPIS.GERP.GIMS.BLL
{
    public class ResourceMasterGroupBLL : IBLLResourceMasterGroup
    {
        private static readonly IDALResourceMasterGroup dal = DataAccess.CreateResourceMasterGroup();

        public ResourceMasterGroupBLL()
        {

        }

        public IList<ResourceMasterGroupInfo> GetResourceMasterGroup()
        {
            return dal.GetResourceMasterGroup();
        }

        public IList<ResourceMasterGroupInfo> GetResourceMasterGroup(string record_status)
        {
            return dal.GetResourceMasterGroup(record_status);
        }

        public ResourceMasterGroupInfo GetResourceMasterGroup(int seq)
        {
            return dal.GetResourceMasterGroup(seq);
        }

        public IList<ResourceMasterGroupInfo> GetResourceMasterGroupWithParent(int type_seq)
        {
            return dal.GetResourceMasterGroupWithParent(type_seq);
        }

        public string GetDepreciationCalculate(int type_seq)
        {
            return dal.GetDepreciationCalculate(type_seq);
        }

        public void Insert(ResourceMasterGroupInfo info)
        {
            try
            {
                dal.Insert(info);
            }
            catch
            {
                throw;
            }
        }

        public void Update(ResourceMasterGroupInfo info)
        {
            try
            {
                dal.Update(info);
            }
            catch
            {
                throw;
            }
        }

        public void Delete(ResourceMasterGroupInfo info)
        {
            try
            {
                dal.Delete(info);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteAll(IList<ResourceMasterGroupInfo> infoList)
        {
            try
            {
                dal.DeleteAll(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteFromDB(IList<ResourceMasterGroupInfo> infoList)
        {
            try
            {
                dal.DeleteFromDB(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void Restore(IList<ResourceMasterGroupInfo> infoList)
        {
            try
            {
                dal.Restore(infoList);
            }
            catch
            {
                throw;
            }
        }
    }
}
